package cn.hinglo.permission.common.generator;

import lombok.extern.slf4j.Slf4j;

/**
 * @author HingLo
 * @createTime: 2019/4/29 11:42
 * @description: 创建模板的实体
 */
@Slf4j
public class GeneratorBean {

    public GeneratorBean(String basePath, String generatorPath, String basePackage) {
        this.basePath = basePath;
        this.generatorPath = generatorPath;
        this.basePackage = basePackage;
    }

    private String basePath;
    private String generatorPath;
    private String basePackage;

    private String controllerPackage = "controller";
    private String servicePackage = "service";
    private String beanPackage = "bean";
    private String mapperPackage = "mapper";

    private String controllerTemplate = "controllerTemplate.jf";
    private String serviceTemplate = "serviceTemplate.jf";
    private String mapperTemplate = "mapperTemplate.jf";
    private String beanTemplate = "beanTemplate.jf";


    public String getBasePath() {
        return basePath;
    }

    public void setBasePath(String basePath) {
        this.basePath = basePath;
    }

    public String getGeneratorPath() {
        return generatorPath;
    }

    public void setGeneratorPath(String generatorPath) {
        this.generatorPath = generatorPath;
    }

    public String getBasePackage() {
        return basePackage;
    }

    public void setBasePackage(String basePackage) {
        this.basePackage = basePackage;
    }

    public String getControllerPackage() {
        return this.basePackage + controllerPackage;
    }

    public void setControllerPackage(String controllerPackage) {
        this.controllerPackage = controllerPackage;
    }

    public String getServicePackage() {
        return this.basePackage + servicePackage;
    }

    public void setServicePackage(String servicePackage) {
        this.servicePackage = servicePackage;
    }

    public String getBeanPackage() {
        return this.basePackage + beanPackage;
    }

    public void setBeanPackage(String beanPackage) {
        this.beanPackage = beanPackage;
    }

    public String getMapperPackage() {
        return this.basePackage + mapperPackage;
    }

    public void setMapperPackage(String mapperPackage) {
        this.mapperPackage = mapperPackage;
    }

    public String getControllerTemplate() {
        return generatorPath + controllerTemplate;
    }

    public void setControllerTemplate(String controllerTemplate) {
        this.controllerTemplate = controllerTemplate;
    }

    public String getServiceTemplate() {
        return generatorPath + serviceTemplate;
    }

    public void setServiceTemplate(String serviceTemplate) {
        this.serviceTemplate = serviceTemplate;
    }

    public String getMapperTemplate() {
        return generatorPath + mapperTemplate;
    }

    public void setMapperTemplate(String mapperTemplate) {
        this.mapperTemplate = mapperTemplate;
    }

    public String getBeanTemplate() {
        return generatorPath + beanTemplate;
    }

    public void setBeanTemplate(String beanTemplate) {
        this.beanTemplate = beanTemplate;
    }
}
